﻿using QuartzServices.Domain.Core.Models;
using System.Linq.Expressions;

namespace QuartzServices.Domain.Interfaces
{
    public interface IRepository<TEntity> : IDisposable where TEntity : Entity
    {
        /// <summary>
        /// 删除后自动savechange
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        Task RemoveRange(List<string> ids);
        Task AddRangeAsync(List<TEntity> list);
        Task<int> CountAsync(Expression<Func<TEntity,bool>> where);
        Task<List<TEntity>> PageListAsync(Expression<Func<TEntity, bool>> where,int offset,int limit);
    }
}
